/****************************************************************************
 * Copyright (C) 2011-2013 Dj_Skual
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ***************************************************************************/
#ifndef WIISAVEBROWSER_H_
#define WIISAVEBROWSER_H_

#include "WiiSave_List.h"
#include "../../GUI/gui.h"
#include "../../GUI/gui_longtext.hpp"

class WiiSaveBrowser : public GuiFrame, public sigslot::has_slots<>
{
public:
	WiiSaveBrowser(WiiSave_List * list, GuiFrame * parentElement);
	virtual ~WiiSaveBrowser();
	
	sigslot::signal1<int> Closed;
	
private:
	void OnButtonClick(GuiButton *sender, int pointer, const POINT &p);
	void OnChangeSaveClick(GuiButton *sender, int pointer, const POINT &p);
	void OnTextMoveClick(GuiButton *sender, int pointer, const POINT &p);
	
	void ChangeSave(bool effect = true);
	
	int selectedSave;
	int size;
	
	GuiImageData * imgDialogBox;
	GuiImageData * imgLine;
	GuiImageData * imgButtonBox;
	
	GuiImage * dialogBoxImg;
	GuiImage * lineImg;
	GuiImage * closeBoxImg;
	GuiImage * downloadBoxImg;
	GuiImage * nextBoxImg;
	GuiImage * previousBoxImg;
	
	PictureButton * btnClose;
	PictureButton * btnDownload;
	PictureButton * btnNext;
	PictureButton * btnPrevious;
	GuiButton * btnUp;
	GuiButton * btnDown;
	
	GuiText * nameTxt;
	GuiText * numberTxt;
	GuiLongText * synopsisTxt;
	
	GuiTrigger * trigA;
	GuiTrigger * trigB;
	GuiTrigger * trigLeft;
	GuiTrigger * trigRight;
	GuiTrigger * trigUp;
	GuiTrigger * trigDown;
	GuiTrigger * trigPlus;
	GuiTrigger * trigMinus;
	
	GuiSound * btnSoundClick;
	GuiSound * btnSoundOver;
	
	WiiSave_List * saveList;
};

#endif
